class Author < ActiveRecord::Base
  has_many :books, :dependent => :destroy
  
  validates :firstname, :presence => true
  validates :lastname, :presence => true
  
  def full_name
    "#{firstname} #{lastname}"
  end
end
